Optimal. Leaf size=91 \[ \frac{b \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e+f x^2}}\right )}{d \sqrt{f}}-\frac{(b c-a d) \tan ^{-1}\left (\frac{x \sqrt{d e-c f}}{\sqrt{c} \sqrt{e+f x^2}}\right )}{\sqrt{c} d \sqrt{d e-c f}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0481703, antiderivative size = 91, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {523, 217, 206, 377, 205} \[ \frac{b \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e+f x^2}}\right )}{d \sqrt{f}}-\frac{(b c-a d) \tan ^{-1}\left (\frac{x \sqrt{d e-c f}}{\sqrt{c} \sqrt{e+f x^2}}\right )}{\sqrt{c} d \sqrt{d e-c f}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 523
Rule 217
Rule 206
Rule 377
Rule 205
Rubi steps
\begin{align*} \int \frac{a+b x^2}{\left (c+d x^2\right ) \sqrt{e+f x^2}} \, dx &=\frac{b \int \frac{1}{\sqrt{e+f x^2}} \, dx}{d}+\frac{(-b c+a d) \int \frac{1}{\left (c+d x^2\right ) \sqrt{e+f x^2}} \, dx}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \frac{1}{1-f x^2} \, dx,x,\frac{x}{\sqrt{e+f x^2}}\right )}{d}+\frac{(-b c+a d) \operatorname{Subst}\left (\int \frac{1}{c-(-d e+c f) x^2} \, dx,x,\frac{x}{\sqrt{e+f x^2}}\right )}{d}\\ &=-\frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{d e-c f} x}{\sqrt{c} \sqrt{e+f x^2}}\right )}{\sqrt{c} d \sqrt{d e-c f}}+\frac{b \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e+f x^2}}\right )}{d \sqrt{f}}\\ \end{align*}
Mathematica [A] time = 0.109592, size = 88, normalized size = 0.97 \[ \frac{\frac{(a d-b c) \tan ^{-1}\left (\frac{x \sqrt{d e-c f}}{\sqrt{c} \sqrt{e+f x^2}}\right )}{\sqrt{c} \sqrt{d e-c f}}+\frac{b \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e+f x^2}}\right )}{\sqrt{f}}}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.009, size = 646, normalized size = 7.1 \begin{align*}{\frac{b}{d}\ln \left ( x\sqrt{f}+\sqrt{f{x}^{2}+e} \right ){\frac{1}{\sqrt{f}}}}-{\frac{a}{2}\ln \left ({ \left ( -2\,{\frac{cf-de}{d}}+2\,{\frac{f\sqrt{-cd}}{d} \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) }+2\,\sqrt{-{\frac{cf-de}{d}}}\sqrt{ \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) ^{2}f+2\,{\frac{f\sqrt{-cd}}{d} \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) }-{\frac{cf-de}{d}}} \right ) \left ( x-{\frac{1}{d}\sqrt{-cd}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-cd}}}{\frac{1}{\sqrt{-{\frac{cf-de}{d}}}}}}+{\frac{bc}{2\,d}\ln \left ({ \left ( -2\,{\frac{cf-de}{d}}+2\,{\frac{f\sqrt{-cd}}{d} \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) }+2\,\sqrt{-{\frac{cf-de}{d}}}\sqrt{ \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) ^{2}f+2\,{\frac{f\sqrt{-cd}}{d} \left ( x-{\frac{\sqrt{-cd}}{d}} \right ) }-{\frac{cf-de}{d}}} \right ) \left ( x-{\frac{1}{d}\sqrt{-cd}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-cd}}}{\frac{1}{\sqrt{-{\frac{cf-de}{d}}}}}}+{\frac{a}{2}\ln \left ({ \left ( -2\,{\frac{cf-de}{d}}-2\,{\frac{f\sqrt{-cd}}{d} \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) }+2\,\sqrt{-{\frac{cf-de}{d}}}\sqrt{ \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) ^{2}f-2\,{\frac{f\sqrt{-cd}}{d} \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) }-{\frac{cf-de}{d}}} \right ) \left ( x+{\frac{1}{d}\sqrt{-cd}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-cd}}}{\frac{1}{\sqrt{-{\frac{cf-de}{d}}}}}}-{\frac{bc}{2\,d}\ln \left ({ \left ( -2\,{\frac{cf-de}{d}}-2\,{\frac{f\sqrt{-cd}}{d} \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) }+2\,\sqrt{-{\frac{cf-de}{d}}}\sqrt{ \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) ^{2}f-2\,{\frac{f\sqrt{-cd}}{d} \left ( x+{\frac{\sqrt{-cd}}{d}} \right ) }-{\frac{cf-de}{d}}} \right ) \left ( x+{\frac{1}{d}\sqrt{-cd}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-cd}}}{\frac{1}{\sqrt{-{\frac{cf-de}{d}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 7.24016, size = 1596, normalized size = 17.54 \begin{align*} \left [\frac{\sqrt{-c d e + c^{2} f}{\left (b c - a d\right )} f \log \left (\frac{{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \,{\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \,{\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt{-c d e + c^{2} f} \sqrt{f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) + 2 \,{\left (b c d e - b c^{2} f\right )} \sqrt{f} \log \left (-2 \, f x^{2} - 2 \, \sqrt{f x^{2} + e} \sqrt{f} x - e\right )}{4 \,{\left (c d^{2} e f - c^{2} d f^{2}\right )}}, -\frac{\sqrt{c d e - c^{2} f}{\left (b c - a d\right )} f \arctan \left (\frac{\sqrt{c d e - c^{2} f}{\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt{f x^{2} + e}}{2 \,{\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} +{\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) -{\left (b c d e - b c^{2} f\right )} \sqrt{f} \log \left (-2 \, f x^{2} - 2 \, \sqrt{f x^{2} + e} \sqrt{f} x - e\right )}{2 \,{\left (c d^{2} e f - c^{2} d f^{2}\right )}}, \frac{\sqrt{-c d e + c^{2} f}{\left (b c - a d\right )} f \log \left (\frac{{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \,{\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \,{\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt{-c d e + c^{2} f} \sqrt{f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) - 4 \,{\left (b c d e - b c^{2} f\right )} \sqrt{-f} \arctan \left (\frac{\sqrt{-f} x}{\sqrt{f x^{2} + e}}\right )}{4 \,{\left (c d^{2} e f - c^{2} d f^{2}\right )}}, -\frac{\sqrt{c d e - c^{2} f}{\left (b c - a d\right )} f \arctan \left (\frac{\sqrt{c d e - c^{2} f}{\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt{f x^{2} + e}}{2 \,{\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} +{\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) + 2 \,{\left (b c d e - b c^{2} f\right )} \sqrt{-f} \arctan \left (\frac{\sqrt{-f} x}{\sqrt{f x^{2} + e}}\right )}{2 \,{\left (c d^{2} e f - c^{2} d f^{2}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b x^{2}}{\left (c + d x^{2}\right ) \sqrt{e + f x^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.66463, size = 159, normalized size = 1.75 \begin{align*} \frac{{\left (b c \sqrt{f} - a d \sqrt{f}\right )} \arctan \left (\frac{{\left (\sqrt{f} x - \sqrt{f x^{2} + e}\right )}^{2} d + 2 \, c f - d e}{2 \, \sqrt{-c^{2} f^{2} + c d f e}}\right )}{\sqrt{-c^{2} f^{2} + c d f e} d} - \frac{b \log \left ({\left (\sqrt{f} x - \sqrt{f x^{2} + e}\right )}^{2}\right )}{2 \, d \sqrt{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]